package com.lefeng.cockpit.common.bean.dto.dataxjson;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 构建json dto
 *
 * @author weifw
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DataXJsonBuildDto implements Serializable {

    @NotNull(message = "READER数据源编号不能为空")
    @ApiModelProperty(value = "reader数据源编号")
    private Integer readerDatasourceId;

    @NotEmpty(message = "READER表不能为空")
    @ApiModelProperty(value = "reader表")
    private List<String> readerTables;

    @ApiModelProperty(value = "reader字段")
    @NotEmpty(message = "READER字段不能为空")
    private List<String> readerColumns;

    @NotNull(message = "WRITER数据源编号不能为空")
    @ApiModelProperty(value = "writer数据源编号")
    private Integer writerDatasourceId;

    @ApiModelProperty(value = "writer表")
    @NotEmpty(message = "WRITER表不能为空")
    private List<String> writerTables;

    @NotEmpty(message = "writerColumns cannot be empty")
    @ApiModelProperty(value = "WRITER字段不能为空")
    private List<String> writerColumns;

    private HiveReaderDto hiveReader;

    private HiveWriterDto hiveWriter;

    private HbaseReaderDto hbaseReader;

    private HbaseWriterDto hbaseWriter;

    private RdbmsReaderDto rdbmsReader;

    private RdbmsWriterDto rdbmsWriter;

    private MongoDBReaderDto mongoDBReader;

    private MongoDBWriterDto mongoDBWriter;
}
